package Test1230am;

public class Test10 {
    public static void main(String[] args) {


        // (10)求数组中最大的元素
        int max = 0;
        int[] arr = {5, 3, 8, 2, 6};
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] > max) {
                max = arr[i];

            }
        }
        System.out.println(max);

    }
}